#ifndef SIMPLETCPSERVERDLL_GLOBAL_H
#define SIMPLETCPSERVERDLL_GLOBAL_H

#include <QtCore/qglobal.h>

#if defined(SIMPLETCPSERVERDLL_LIBRARY)
#  define SIMPLETCPSERVERDLLSHARED_EXPORT Q_DECL_EXPORT
#else
#  define SIMPLETCPSERVERDLLSHARED_EXPORT Q_DECL_IMPORT
#endif

#define LOOPRUN_STATECHANGE 1
#define LOOPRUN_SEND 2
#define LOOPRUN_RECEIVE 3
#define LOOPRUN_DEFAULT_ALL 4

SIMPLETCPSERVERDLLSHARED_EXPORT bool  COM_ComServerInstanceExist();
SIMPLETCPSERVERDLLSHARED_EXPORT short COM_ComServerInstanceInit();
SIMPLETCPSERVERDLLSHARED_EXPORT short COM_ComServerInstanceRelease();

SIMPLETCPSERVERDLLSHARED_EXPORT short COM_ComServeradd(const int port, int& order);
SIMPLETCPSERVERDLLSHARED_EXPORT short COM_ComServerlisten(int order);

SIMPLETCPSERVERDLLSHARED_EXPORT short COM_serverSendData(const int Order,const int SubOrder,QByteArray Data);
SIMPLETCPSERVERDLLSHARED_EXPORT short COM_serverReadData(const int Order,const int SubOrder,QByteArray& Data);

SIMPLETCPSERVERDLLSHARED_EXPORT short COM_ComServerClientNumber(const int order,int& number);
SIMPLETCPSERVERDLLSHARED_EXPORT bool  COM_getServerClientReadStatus(const int Order,const int subOrder);
SIMPLETCPSERVERDLLSHARED_EXPORT bool  COM_getServerClientSendStatus(const int Order,const int subOrder);

SIMPLETCPSERVERDLLSHARED_EXPORT void  COM_serverMainThreadLoopRun(short type);


#endif // SIMPLETCPSERVERDLL_GLOBAL_H
